<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link href="${rootPath }/common/resouce/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${rootPath }/common/resouce/static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="${rootPath }/common/resouce/static/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<script type="text/javascript" src="${rootPath }/common/resouce/jquery.min.js"></script> 
<script type="text/javascript" src="${rootPath }/common/resouce/static/h-ui/js/H-ui.min.js"></script>
	
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/h-ui.admin/skin/red/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/h-ui.admin/css/style.css" />
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="${rootPath }/common/resouce/jquery.min.js"></script>
<script type="text/javascript" src="${rootPath }/common/resouce/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="${rootPath }/common/resouce/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="${rootPath }/common/resouce/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->
	
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="${rootPath }/common/resouce/static/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript">
$(function(){
	/*$("#min_title_list li").contextMenu('Huiadminmenu', {
		bindings: {
			'closethis': function(t) {
				console.log(t);
				if(t.find("i")){
					t.find("i").trigger("click");
				}
			},
			'closeall': function(t) {
				alert('Trigger was '+t.id+'\nAction was Email');
			},
		}
	});*/
});
/*个人信息*/
function myselfinfo(){
	layer.open({
		type: 1,
		area: ['300px','200px'],
		fix: false, //不固定
		maxmin: true,
		shade:0.4,
		title: '查看信息',
		content: '<div>管理员信息</div>'
	});
}

/*资讯-添加*/
function article_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*图片-添加*/
function picture_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*产品-添加*/
function product_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*用户-添加*/
function member_add(title,url,w,h){
	layer_show(title,url,w,h);
}

</script>
	
	
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="${rootPath }/common/resouce/static/h-ui.admin/css/style.css" />
		
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="${rootPath }/common/resouce/static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${rootPath }/common/resouce/static/lib/datatables/1.10.15/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="${rootPath }/common/resouce/static/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
	/*
	 参数解释：
	 title	标题
	 url		请求的url
	 id		需要操作的数据id
	 w		弹出层宽度（缺省调默认值）
	 h		弹出层高度（缺省调默认值）
	 */
	/*管理员-增加*/
	function admin_add(title, url, w, h) {
		layer_show(title, url, w, h);
	}
	/*管理员-删除*/
	function admin_del(obj, id) {
		layer.confirm('确认要删除吗？', function(index) {
			$.ajax({
				type : 'POST',
				url : '',
				dataType : 'json',
				success : function(data) {
					$(obj).parents("tr").remove();
					layer.msg('已删除!', {
						icon : 1,
						time : 1000
					});
				},
				error : function(data) {
					console.log(data.msg);
				},
			});
		});
	}

	/*管理员-编辑*/
	function admin_edit(title, url, id, w, h) {
		layer_show(title, url, w, h);
	}
	/*管理员-停用*/
	function admin_stop(obj, id) {
		layer
				.confirm(
						'确认要停用吗？',
						function(index) {
							//此处请求后台程序，下方是成功后的前台处理……

							$(obj)
									.parents("tr")
									.find(".td-manage")
									.prepend(
											'<a onClick="admin_start(this,id)" href="javascript:;" title="启用" style="text-decoration:none"><i class="Hui-iconfont">&#xe615;</i></a>');
							$(obj)
									.parents("tr")
									.find(".td-status")
									.html(
											'<span class="label label-default radius">已禁用</span>');
							$(obj).remove();
							layer.msg('已停用!', {
								icon : 5,
								time : 1000
							});
						});
	}

	/*管理员-启用*/
	function admin_start(obj, id) {
		layer
				.confirm(
						'确认要启用吗？',
						function(index) {
							//此处请求后台程序，下方是成功后的前台处理……

							$(obj)
									.parents("tr")
									.find(".td-manage")
									.prepend(
											'<a onClick="admin_stop(this,id)" href="javascript:;" title="停用" style="text-decoration:none"><i class="Hui-iconfont">&#xe631;</i></a>');
							$(obj)
									.parents("tr")
									.find(".td-status")
									.html(
											'<span class="label label-success radius">已启用</span>');
							$(obj).remove();
							layer.msg('已启用!', {
								icon : 6,
								time : 1000
							});
						});
	}
</script>
	
<script type="text/javascript">
	/**
		返回值:如果是false,时间阻止
		~获取当前页面dom元素,为当前页的dom元素赋值
		~获取每多少条的dom元素,为每页多少条的dom元素设置值
	*/
	function pageFormSubmit(formId, currentPageId,currentPageVal,pageSizeId,pageSizeVal)
	{
		console.info("====" + $("#" + currentPageId).length );
		/* 获取单前页的dom元素,为当前页的dom元素赋值 */
		$("#" + currentPageId).prop("value",currentPageVal);
		$("#" + pageSizeId).prop("value",pageSizeVal);
		/*
			通过js来让表单提交
			通过jquery里面的id选择器来做
		*/
		$("#" + formId).submit();
		return false ;
	}
</script>	
		